package com.mzpai.product.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.mzpai.mapper.BaseMapper;
import com.mzpai.product.model.UserSuccessKilled;


@Repository
public interface UserSuccessKilledMapper extends BaseMapper<UserSuccessKilled>{
	
	/**
	 * 根据主键查询
	 * @param map
	 * @return
	 */
	UserSuccessKilled queryByPrimaryId(Integer id);
	
	void insertBatch(@Param("userSuccessKilledlList")List<UserSuccessKilled> userSuccessKilledlList);
	
	
	int updateUserSuccessKilledByOrderId(UserSuccessKilled userSuccessKilled);
	
	
	/**
	 * 统计当前用户购买商品总数
	 * @param productId
	 */
	Integer countTotalByUserIdAndSeckillId(Map<String,Object> map);
	
}